import { Button, Modal } from 'antd';
import { useState } from 'react';
const App = ({delIsopen,delreceive}) => {
  const [isModalOpen, setIsModalOpen] = useState(true);
  const showModal = () => {
    setIsModalOpen(true);
  };
  const handleOk = () => {
    delreceive(false,"sure");
  };
  const handleCancel = () => {
    // 控制弹窗显示隐藏的状态在父组件中，子组件要修改父组件的状态了
    delreceive(false)
  };
  return (
    <>
      
      <Modal title="删除" open={delIsopen} onOk={handleOk} onCancel={handleCancel}>
        <p>您确定要删除吗?</p>
      </Modal>
    </>
  );
};
export default App;